/*
 * OpenParts
 * A dynamic-loading components framework for GWT
 * Copyright (C) 2011 Christophe Bouthier  [chris{AT}binary-gastronome{DOT}fr]
 *
 * This work is partially based on work I have done at INRIA (http://www.inria.fr) 
 * in the context of the Qualipso European Project (http://qualipso.org/),
 * The work done at INRIA is Copyright (C) 2006-2011 INRIA
 *
 * This work is distributed under the LGPL version 3
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License version 3
 * as published by the Free Software Foundation. See the GNU
 * Lesser General Public License in LGPL.txt for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package fr.openparts.OpenParts.test.gwt;

import junit.framework.Test;
import junit.framework.TestSuite;

import org.apache.commons.logging.LogFactory;

import com.google.gwt.junit.tools.GWTTestSuite;

import fr.openparts.OpenParts.test.gwt.tests.OPBinderBuildingDataEventHandlerTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPBinderBuildingDataServiceNameTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPBinderBuildingDataViewFactoryTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPBinderInternalExternalBinderTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPBindingActionTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPBindingResourceTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPBindingServiceTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPCommandCallbackCallerTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPCommandFactoryTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPCommandFailureReasonTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPCommandTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPContainerTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPMessagesDispatcherTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPOnEmbeddedViewAttachTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPParamsJSTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPPartContainerTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPPartLoadingRequestTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPPartsLoaderBindingTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPPartsLoaderTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPProxyMessagesDispatchingTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPSchedulerBindingTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPSchedulerTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPSharedBindingDataTreeTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPSharedBindingListenersTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPSharedBindingPartsLoaderTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPSharedBindingSchedulerTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPSharedBindingSlotCounterTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPShellBindingSingletonTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPShellDispatchEventTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPShellDisplayViewTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPShellPartLoadingTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPSlotProxyTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPSlotTestGwt;
import fr.openparts.OpenParts.test.gwt.tests.OPViewProxyTestGwt;

/**
 * GWT test suite to test the OpenParts classes that use JS.
 * 
 * @author Christophe Bouthier [chris{AT}binary-gastronome{DOT}fr]
 * @creation.date 3 December 2009
 */
public final class GwtOpenPartsSuite extends GWTTestSuite {

    // to remove exception logging of htmlunit when trying to load an inexistant js script
    static {
        LogFactory.getFactory().setAttribute("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog");
    }
    
    /**
     * Define all tests in a test suite and return the corresponding test suite. Allow the whole tests to be run in the same GWT environment, thus avoiding to
     * end and restart the whole GWT environment for each GWTTestCase (way much faster).
     * 
     * @return a new test suite containing all the defined tests.
     */
    public final static Test suite() {
        final TestSuite suite = new TestSuite("GWT tests for the OpenParts project");
        suite.addTestSuite(OPParamsJSTestGwt.class);
        suite.addTestSuite(OPBinderInternalExternalBinderTestGwt.class);
        suite.addTestSuite(OPBinderBuildingDataServiceNameTestGwt.class);
        suite.addTestSuite(OPBinderBuildingDataEventHandlerTestGwt.class);
        suite.addTestSuite(OPBinderBuildingDataViewFactoryTestGwt.class);
        suite.addTestSuite(OPBindingServiceTestGwt.class);
        suite.addTestSuite(OPBindingResourceTestGwt.class);
        suite.addTestSuite(OPBindingActionTestGwt.class);
        suite.addTestSuite(OPSharedBindingPartsLoaderTestGwt.class);
        suite.addTestSuite(OPSharedBindingSchedulerTestGwt.class);
        suite.addTestSuite(OPSharedBindingListenersTestGwt.class);
        suite.addTestSuite(OPSharedBindingSlotCounterTestGwt.class);
        suite.addTestSuite(OPSharedBindingDataTreeTestGwt.class);
        suite.addTestSuite(OPPartContainerTestGwt.class);
        suite.addTestSuite(OPPartLoadingRequestTestGwt.class);
        suite.addTestSuite(OPPartsLoaderBindingTestGwt.class);
        suite.addTestSuite(OPPartsLoaderTestGwt.class);
        suite.addTestSuite(OPCommandFailureReasonTestGwt.class);
        suite.addTestSuite(OPCommandCallbackCallerTestGwt.class);
        suite.addTestSuite(OPCommandTestGwt.class);
        suite.addTestSuite(OPCommandFactoryTestGwt.class);
        suite.addTestSuite(OPSchedulerBindingTestGwt.class);
        suite.addTestSuite(OPSchedulerTestGwt.class);
        suite.addTestSuite(OPMessagesDispatcherTestGwt.class);
        suite.addTestSuite(OPViewProxyTestGwt.class);
        suite.addTestSuite(OPSlotProxyTestGwt.class);
        suite.addTestSuite(OPSlotTestGwt.class);
        suite.addTestSuite(OPShellBindingSingletonTestGwt.class);
        suite.addTestSuite(OPShellPartLoadingTestGwt.class);
        suite.addTestSuite(OPShellDispatchEventTestGwt.class);
        suite.addTestSuite(OPShellDisplayViewTestGwt.class);
        suite.addTestSuite(OPProxyMessagesDispatchingTestGwt.class);
        suite.addTestSuite(OPOnEmbeddedViewAttachTestGwt.class);
        suite.addTestSuite(OPContainerTestGwt.class);
        return suite;
    }
}
